The present invention relates to an imaging device, an electronic device, and the like.
Technology that is referred to as depth-from-defocus (DFD) is known that acquires a plurality of images that are identical in scene, but differ in focal distance (or in-focus object plane position (that represents the position of the object in an in-focus state)) using a camera, and measures the distance by utilizing the fact that the spread parameter (that represents the correlation between the images as to the amount of defocus) and the object distance have a one-to-one relationship.
JP-A-4-343312 discloses a method that acquires a plurality of images that differ in focal distance by driving the imaging lens in the direction along the optical axis. JP-A-5-30409 discloses a method that divides the incident light using a half mirror or a prism, and simultaneously captures a plurality of images that differ in focus state using a plurality of image sensors placed at positions that differ in optical path length.
It is ideal that the images subjected to DFD only differ in the amount of defocus. If the images subjected to DFD also differ in a factor other than the amount of defocus, the spread parameter may include an error, and the ranging accuracy may deteriorate due to the absence of correct object distance information.